﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Artisan.Server.Http
{
    public class JadOutputStream
    {
        private BufferedStream _stream;
        public JadOutputStream(BufferedStream stream)
        {
            _stream = stream;
        }

        public void WriteLine(String str)
        {
            byte[] bytes = Encoding.Default.GetBytes(str + "\r\n");
            _stream.Write(bytes, 0, bytes.Length);

        }
        public void Write(String str)
        {
            byte[] bytes = Encoding.Default.GetBytes(str);
            _stream.Write(bytes, 0, bytes.Length);
        }
        public void Write(byte[] bytes)
        {
            _stream.Write(bytes, 0, bytes.Length);
        }
        public void Flush()
        {
            _stream.Flush();
        }
    }
}
